package sindconsole.auth.bean;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableId;
import common.excel.BiMapConverter;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
public class User implements Serializable {

    public static class StatusConverter extends BiMapConverter<Short> {
        public StatusConverter() {
            map.put((short) -1, "已冻结");
            map.put((short) 0, "正常");
        }
    }

    public static class GenderConverter extends BiMapConverter<Short> {
        public GenderConverter() {
            map.put((short) 0, "女");
            map.put((short) 1, "男");
        }
    }

    @TableId
    Long id;
    @ExcelProperty(value = "状态", converter = StatusConverter.class)
    Short status;
    @ExcelProperty("昵称")
    String nickname;
    @ExcelProperty("头像")
    String avatar;
    @ExcelProperty("心情")
    String slogan;
    @ExcelProperty("姓名")
    String name;
    @ExcelProperty(value = "性别", converter = GenderConverter.class)
    Short gender;
    @ExcelProperty("生日")
    Date birthday;
    @ExcelProperty("手机")
    String phone;
    @ExcelProperty("手机状态")
    Short phoneStatus;
    @ExcelProperty("邮箱")
    String mail;
    @ExcelProperty("邮箱状态")
    Short mailStatus;
    @ExcelProperty("创建时间")
    Date createdTime;
    @ExcelProperty("修改时间")
    Date updatedTime;

    Long unitId;

}
